<?php
include('../../inc/global.inc');
include("../islogin.php");
?>
<?php
//删除信息
if($_GET['del_act']){
mysql_query("delete from admin where id=$_GET[del_id]");
echo "<script>alert('删除成功');location='index.php';</script>";
}
?>
<HTML>
<HEAD>
<TITLE>Admin</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<LINK href="../css/css.css" rel=stylesheet>
<script type='text/javascript' src="../js/islogin.js" charset="gb2312"></script>
</HEAD>
<BODY>
<center>
  <table width="80%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
    <tr>
      <td height="25" bgcolor="#EEEEF9" style="padding-left:5px;">管理员&nbsp;&nbsp;<a href="javascript:history.go(-1)">返回</a></td>
    </tr>
  </table>
  <table width="80%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
    <tr>
      <td width="10%" height="30" align="center" bgcolor="#8DA8CF">编号</td>
      <td width="15%" align="center" bgcolor="#8DA8CF">用户名</td>
      <td width="12%" align="center" bgcolor="#8DA8CF">姓名</td>
      <td width="15%" align="center" bgcolor="#8DA8CF"><a href="index_modify.php?tj=ok" onClick="">添加管理员</a></td>
    </tr>
<?php
$rs=mysql_query("select * from admin order by id");
$i=1;
$color=($i%2)?"#FFFFFF":"#eeeeee";
while ($row=mysql_fetch_array($rs)){
?>
<tr bgcolor="<?=$color?>">
      <td height=25 align=center><?=$i?></td>
      <td height=25 align=center><?=$row[admin_cname]?></td>
      <td height=25 align=center><?=$row['admin_name']?></td>
      <td height=25 align=center><a href='index_modify.php?xg=ok&xg_id=<?=$row['id']?>'>编辑</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='index.php?del_act=ok&del_id=<?=$row['id']?>' onClick='return del()'>删除</a></td>
    </tr>
<?
	$i++;}
?>	
  </table>
</center>
</BODY>
</HTML>
